﻿<!doctype html>
<html>
<head>
    <title>SpreadJS - Basic Fill</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    
    <link href="../../../external/spreadjs/css/gcspread.sheets.excel2013white.9.40.20161.0.css" rel="stylesheet" type="text/css" />

    <script src="../../../external/external/jquery-1.8.2.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../../external/spreadjs/gcspread.sheets.all.9.40.20161.0.min.js"></script>

    <script id="scriptInit" type="text/javascript">
        /*code_begin*/
        $(document).ready(function () {
            var spread = new GcSpread.Sheets.Spread(document.getElementById("ss"), { sheetCount: 2 });
            initSpread(spread);
        });

        function initSpread(spread) {
            var sheet = spread.getSheet(0);

            sheet.setArray(2, 2, [[1, "a"], [2, "b"]]);

            $("#chkShowDragFillTip").click(function() {
                spread.showDragFillTip($(this).prop('checked'));
            });

            $("#chkShowDragFillSmartTag").click(function () {
                spread.showDragFillSmartTag($(this).prop("checked"));
            });

            $("#dragFillType").change(function () {
                var type = parseInt($(this).val(), 10);
                if (!isNaN(type)) {
                    spread.defaultDragFillType(type);
                }
            });
        };
        /*code_end*/
    </script>

</head>
<body>
<div class="sample-turtorial">
    <div id="ss" style="width:100%; height:400px;border: 1px solid gray;"></div>
    <div class="demo-options">
        <div class="option-row">
            <label for="dragFillType">Default Drag Fill Type:</label>
            <select id="dragFillType" title="Select one for default drag fill type.">
                <option value="5" selected="selected">Auto</option>
                <option value="0">Copy Cells</option>
                <option value="1">Fill Series</option>
                <option value="2">Fill Formatting Only</option>
                <option value="3">Fill Without Formatting</option>
            </select>
        </div>
        <div class="option-row">
            <input type="checkbox" id="chkShowDragFillTip" checked />
            <label for="chkShowDragFillTip">Show Drag Fill Tip</label>
        </div>
        <div class="option-row">
            <input id="chkShowDragFillSmartTag" type="checkbox" checked="checked">
            <label for="chkShowDragFillSmartTag">Show Drag Fill Smart Tag</label>
        </div>
    </div>
</div>
</body>
</html>
